<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no">
  <meta name="description" content="API docs for the TextStyle constructor from the Class TextStyle class from the dart:ui library, for the Dart programming language.">
  <title>TextStyle constructor - TextStyle class - dart:ui library - Dart API</title>
  <!-- required because all the links are pseudo-absolute -->
  <base href="../..">

  <link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500,400i,400,300|Source+Sans+Pro:400,300,700" rel="stylesheet">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  <link rel="stylesheet" href="static-assets/github.css">
  <link rel="stylesheet" href="static-assets/styles.css">
  <link rel="icon" href="static-assets/favicon.png">
  
</head>

<body>

<div id="overlay-under-drawer"></div>

<header id="title">
  <button id="sidenav-left-toggle" type="button">&nbsp;</button>
  <ol class="breadcrumbs gt-separated dark hidden-xs">
    <li><a href="index.html">manage_calendar_events</a></li>
    <li><a href="dart-ui/dart-ui-library.html">dart:ui</a></li>
    <li><a href="dart-ui/TextStyle-class.html">TextStyle</a></li>
    <li class="self-crumb">TextStyle constructor</li>
  </ol>
  <div class="self-name">TextStyle</div>
  <form class="search navbar-right" role="search">
    <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<main>

  <div id="dartdoc-sidebar-left" class="col-xs-6 col-sm-3 col-md-2 sidebar sidebar-offcanvas-left">
    <header id="header-search-sidebar" class="hidden-l">
      <form class="search-sidebar" role="search">
        <input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
      </form>
    </header>
    
    <ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav">
      <li><a href="index.html">manage_calendar_events</a></li>
      <li><a href="dart-ui/dart-ui-library.html">dart:ui</a></li>
      <li><a href="dart-ui/TextStyle-class.html">TextStyle</a></li>
      <li class="self-crumb">TextStyle constructor</li>
    </ol>
    
    <h5>TextStyle class</h5>
    <ol>
      <li class="section-title"><a href="dart-ui/TextStyle-class.html#constructors">Constructors</a></li>
      <li><a href="dart-ui/TextStyle/TextStyle.html">TextStyle</a></li>
    
      <li class="section-title">
        <a href="dart-ui/TextStyle-class.html#instance-properties">Properties</a>
      </li>
      <li><a href="dart-ui/TextStyle/hashCode.html">hashCode</a></li>
      <li class="inherited"><a href="dart-core/Object/runtimeType.html">runtimeType</a></li>
    
      <li class="section-title"><a href="dart-ui/TextStyle-class.html#instance-methods">Methods</a></li>
      <li><a href="dart-ui/TextStyle/toString.html">toString</a></li>
      <li class="inherited"><a href="dart-core/Object/noSuchMethod.html">noSuchMethod</a></li>
    
      <li class="section-title"><a href="dart-ui/TextStyle-class.html#operators">Operators</a></li>
      <li><a href="dart-ui/TextStyle/operator_equals.html">operator ==</a></li>
    
    
    
    </ol>
  </div><!--/.sidebar-offcanvas-left-->

  <div id="dartdoc-main-content" class="col-xs-12 col-sm-9 col-md-8 main-content">
      <div><h1><span class="kind-constructor">TextStyle</span> constructor</h1></div>

    <section class="multi-line-signature">
      
      <span class="name ">TextStyle</span>(<wbr>{<span class="parameter" id="-param-color"><span class="type-annotation"><a href="dart-ui/Color-class.html">Color</a></span> <span class="parameter-name">color</span>, </span> <span class="parameter" id="-param-decoration"><span class="type-annotation"><a href="dart-ui/TextDecoration-class.html">TextDecoration</a></span> <span class="parameter-name">decoration</span>, </span> <span class="parameter" id="-param-decorationColor"><span class="type-annotation"><a href="dart-ui/Color-class.html">Color</a></span> <span class="parameter-name">decorationColor</span>, </span> <span class="parameter" id="-param-decorationStyle"><span class="type-annotation"><a href="dart-ui/TextDecorationStyle-class.html">TextDecorationStyle</a></span> <span class="parameter-name">decorationStyle</span>, </span> <span class="parameter" id="-param-decorationThickness"><span class="type-annotation"><a href="dart-core/double-class.html">double</a></span> <span class="parameter-name">decorationThickness</span>, </span> <span class="parameter" id="-param-fontWeight"><span class="type-annotation"><a href="dart-ui/FontWeight-class.html">FontWeight</a></span> <span class="parameter-name">fontWeight</span>, </span> <span class="parameter" id="-param-fontStyle"><span class="type-annotation"><a href="dart-ui/FontStyle-class.html">FontStyle</a></span> <span class="parameter-name">fontStyle</span>, </span> <span class="parameter" id="-param-textBaseline"><span class="type-annotation"><a href="dart-ui/TextBaseline-class.html">TextBaseline</a></span> <span class="parameter-name">textBaseline</span>, </span> <span class="parameter" id="-param-fontFamily"><span class="type-annotation"><a href="dart-core/String-class.html">String</a></span> <span class="parameter-name">fontFamily</span>, </span> <span class="parameter" id="-param-fontFamilyFallback"><span class="type-annotation"><a href="dart-core/List-class.html">List</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="dart-core/String-class.html">String</a></span>&gt;</span></span> <span class="parameter-name">fontFamilyFallback</span>, </span> <span class="parameter" id="-param-fontSize"><span class="type-annotation"><a href="dart-core/double-class.html">double</a></span> <span class="parameter-name">fontSize</span>, </span> <span class="parameter" id="-param-letterSpacing"><span class="type-annotation"><a href="dart-core/double-class.html">double</a></span> <span class="parameter-name">letterSpacing</span>, </span> <span class="parameter" id="-param-wordSpacing"><span class="type-annotation"><a href="dart-core/double-class.html">double</a></span> <span class="parameter-name">wordSpacing</span>, </span> <span class="parameter" id="-param-height"><span class="type-annotation"><a href="dart-core/double-class.html">double</a></span> <span class="parameter-name">height</span>, </span> <span class="parameter" id="-param-locale"><span class="type-annotation"><a href="dart-ui/Locale-class.html">Locale</a></span> <span class="parameter-name">locale</span>, </span> <span class="parameter" id="-param-background"><span class="type-annotation"><a href="dart-ui/Paint-class.html">Paint</a></span> <span class="parameter-name">background</span>, </span> <span class="parameter" id="-param-foreground"><span class="type-annotation"><a href="dart-ui/Paint-class.html">Paint</a></span> <span class="parameter-name">foreground</span>, </span> <span class="parameter" id="-param-shadows"><span class="type-annotation"><a href="dart-core/List-class.html">List</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="dart-ui/Shadow-class.html">Shadow</a></span>&gt;</span></span> <span class="parameter-name">shadows</span>, </span> <span class="parameter" id="-param-fontFeatures"><span class="type-annotation"><a href="dart-core/List-class.html">List</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="dart-ui/FontFeature-class.html">FontFeature</a></span>&gt;</span></span> <span class="parameter-name">fontFeatures</span></span> })
    </section>

    <section class="desc markdown">
      <p>Creates a new TextStyle object.</p><ul><li><code>color</code>: The color to use when painting the text. If this is specified, <code>foreground</code> must be null.</li><li><code>decoration</code>: The decorations to paint near the text (e.g., an underline).</li><li><code>decorationColor</code>: The color in which to paint the text decorations.</li><li><code>decorationStyle</code>: The style in which to paint the text decorations (e.g., dashed).</li><li><code>decorationThickness</code>: The thickness of the decoration as a muliplier on the thickness specified by the font.</li><li><code>fontWeight</code>: The typeface thickness to use when painting the text (e.g., bold).</li><li><code>fontStyle</code>: The typeface variant to use when drawing the letters (e.g., italics).</li><li><code>fontFamily</code>: The name of the font to use when painting the text (e.g., Roboto). If a <code>fontFamilyFallback</code> is
provided and <code>fontFamily</code> is not, then the first font family in <code>fontFamilyFallback</code> will take the position of
the preferred font family. When a higher priority font cannot be found or does not contain a glyph, a lower
priority font will be used.</li><li><code>fontFamilyFallback</code>: An ordered list of the names of the fonts to fallback on when a glyph cannot
be found in a higher priority font. When the <code>fontFamily</code> is null, the first font family in this list
is used as the preferred font. Internally, the 'fontFamily<code>is concatenated to the front of this list.
When no font family is provided through 'fontFamilyFallback' (null or empty) or</code>fontFamily`, then the
platform default font will be used.</li><li><code>fontSize</code>: The size of glyphs (in logical pixels) to use when painting the text.</li><li><code>letterSpacing</code>: The amount of space (in logical pixels) to add between each letter.</li><li><code>wordSpacing</code>: The amount of space (in logical pixels) to add at each sequence of white-space (i.e. between each word).</li><li><code>textBaseline</code>: The common baseline that should be aligned between this text span and its parent text span, or, for the root text spans, with the line box.</li><li><code>height</code>: The height of this text span, as a multiplier of the font size.</li><li><code>locale</code>: The locale used to select region-specific glyphs.</li><li><code>background</code>: The paint drawn as a background for the text.</li><li><code>foreground</code>: The paint used to draw the text. If this is specified, <code>color</code> must be null.</li><li><code>fontFeatures</code>: The font features that should be applied to the text.</li></ul>
    </section>
    
    <section class="summary source-code" id="source">
      <h2><span>Implementation</span></h2>
      <pre class="language-dart"><code class="language-dart">TextStyle({
  Color color,
  TextDecoration decoration,
  Color decorationColor,
  TextDecorationStyle decorationStyle,
  double decorationThickness,
  FontWeight fontWeight,
  FontStyle fontStyle,
  TextBaseline textBaseline,
  String fontFamily,
  List&lt;String&gt; fontFamilyFallback,
  double fontSize,
  double letterSpacing,
  double wordSpacing,
  double height,
  Locale locale,
  Paint background,
  Paint foreground,
  List&lt;Shadow&gt; shadows,
  List&lt;FontFeature&gt; fontFeatures,
}) : assert(color == null || foreground == null,
       &#39;Cannot provide both a color and a foreground\n&#39;
       &#39;The color argument is just a shorthand for &quot;foreground: Paint()..color = color&quot;.&#39;
     ),
     _encoded = _encodeTextStyle(
       color,
       decoration,
       decorationColor,
       decorationStyle,
       decorationThickness,
       fontWeight,
       fontStyle,
       textBaseline,
       fontFamily,
       fontFamilyFallback,
       fontSize,
       letterSpacing,
       wordSpacing,
       height,
       locale,
       background,
       foreground,
       shadows,
       fontFeatures,
     ),
     _fontFamily = fontFamily ?? &#39;&#39;,
     _fontFamilyFallback = fontFamilyFallback,
     _fontSize = fontSize,
     _letterSpacing = letterSpacing,
     _wordSpacing = wordSpacing,
     _height = height,
     _decorationThickness = decorationThickness,
     _locale = locale,
     _background = background,
     _foreground = foreground,
     _shadows = shadows,
     _fontFeatures = fontFeatures;</code></pre>
    </section>

  </div> <!-- /.main-content -->

  <div id="dartdoc-sidebar-right" class="col-xs-6 col-sm-6 col-md-2 sidebar sidebar-offcanvas-right">
  </div><!--/.sidebar-offcanvas-->

</main>

<footer>
  <span class="no-break">
    manage_calendar_events 1.0.1
  </span>

  
</footer>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="static-assets/typeahead.bundle.min.js"></script>
<script src="static-assets/highlight.pack.js"></script>
<script src="static-assets/URI.js"></script>
<script src="static-assets/script.js"></script>


</body>

</html>
